package com.copa.module.order.service.impl;

import com.copa.domain.ResponseDto;
import com.copa.module.order.domain.entity.OrderLogEntity;
import com.copa.module.order.mapper.OrderLogDao;
import com.copa.module.order.service.OrderLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author copa
 * @createDate 2021-01-28 18:09
 * @function
 */
@Service
public class OrderLogServiceImpl implements OrderLogService {

    @Autowired
    private OrderLogDao orderLogDao;

    @Override
    public ResponseDto<Boolean> addOrderLog(OrderLogEntity orderLog) {
        int insert = orderLogDao.insert(orderLog);
        if (insert > 0) {
            return ResponseDto.success();
        }
        return ResponseDto.error();
    }
}
